<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-if="flag">显示</div>
        <div v-else="隐藏">隐藏</div>
        <button @click="cut">切换</button>
    </div>
    <script src="../dist/vue.js"></script>
    <div id="app"></div>
    <script>
        // src/core/observer:45;
        const vm = new Vue({
            el: '#app',
            data: {
                flag:true
            },
            methods:{
                cut(){
                    this.flag = !this.flag
                }
            }
        });
        
    </script>
</body>

</html>